export interface ResponseData {
    code: number,
    message: string,
    ok: boolean,
}


//提交订单接口返回的数据
export interface SubmitOrder extends ResponseData {
    data: number
}

//订单详情数据
export interface OrderInfo {
    "id": number,
    "createTime": string,
    "updateTime": string,
    "isDeleted": number,
    "param": {
        "orderStatusString": string
    },
    "userId": number,
    "outTradeNo": string,
    "hoscode": string,
    "hosname": string,
    "depcode": string,
    "depname": string,
    "scheduleId": string,
    "title": string,
    "reserveDate": string,
    "reserveTime": number,
    "patientId": number,
    "patientName": string,
    "patientPhone": string,
    "hosRecordId": string,
    "number": number,
    "fetchTime": string,
    "fetchAddress": string,
    "amount": number,
    "quitTime": string,
    "orderStatus": number
}


//订单接口返回的数据类型
export interface OrderResponseData extends ResponseData {
    data: OrderInfo
}

//支付二维码接口返回的数据
export interface PayInfo {
    "codeUrl": string,
    "orderId": number,
    "totalFee": number,
    "resultCode": string
}

export interface QrCode extends ResponseData {
    data: PayInfo
}

//查询支付结果的ts类型
export interface PayResult extends ResponseData {
    data: boolean
}

//代表一个用户信息的数据类型
export interface UserInfo {
    id: number,
    createTime: string,
    updateTime: string,
    isDeleted: number,
    param: {},
    openid: null,
    nickName: null,
    phone: string,
    name: string,
    certificatesNo: string
    certificatesType: string
    certificatesUrl: null,
    authStatus: number,
    status: number
}

//获取用户信息接口返回的数据
export interface UserInfoResponseData extends ResponseData {
    data: UserInfo
}

//表示某一证件类型
export interface DocumentType {
    "id": number,
    "createTime": string,
    "updateTime": string,
    "isDeleted": number,
    "param": {},
    "parentId": number,
    "name": string,
    "value": string,
    "dictCode": string,
    "hasChildren": boolean
}

export type DocumentArr = DocumentType[]


//表示证件接口返回的数据类型
export interface DocumentTypeResponseData extends ResponseData {
    data: DocumentArr
}

//用户认证携带的参数ts类型
export interface UserParams {
    "certificatesNo": string,
    "certificatesType": string,
    "certificatesUrl": string,
    "name": string
}

//一个订单的类型ts
export interface OrderInfo {
    "id": number,
    "createTime": string,
    "updateTime": string,
    "isDeleted": number,
    "param": {
        "orderStatusString": string
    },
    "userId": number,
    "outTradeNo": string,
    "hoscode": string,
    "hosname": string,
    "depcode": string,
    "depname": string,
    "scheduleId": string,
    "title": string,
    "reserveDate": string,
    "reserveTime": number,
    "patientId": number,
    "patientName": string,
    "patientPhone": string,
    "hosRecordId": string,
    "number": number,
    "fetchTime": string,
    "fetchAddress": string,
    "amount": number,
    "quitTime": string,
    "orderStatus": number
}

export type records = OrderInfo[]

//获取订单接口数据的类型
export interface UserOrderInfoResponseData extends ResponseData {
    data: {
        records: records,
        "total": number,
        "size": number,
        "current": number,
        "orders": [],
        "hitCount": boolean,
        "searchCount": boolean,
        "pages": number
    }
}


//代表就诊人的ts类型
export interface User {
    id: number,
    createTime: string,
    updateTime: string,
    isDeleted: number,
    param: {
        certificatesTypeString: string,
        contactsCertificatesTypeString: string,
        cityString: null,
        fullAddress: string,
        districtString: null,
        provinceString: null
    },
    userId: number,
    name: string,
    certificatesNo: string,
    certificatesType: string,
    sex: number,
    birthday: string,
    phone: string,
    isMarry: number,
    provinceCode: null,
    cityCode: null,
    districtCode: null,
    address: string,
    contactsName: string,
    contactsCertificatesType: string,
    contactsCertificatesNo: string,
    contactsPhone: string,
    isInsure: number,
    cardNo: number,
    status: number
}

// 全部就诊人的数据
export type AllUser = User[]

// 获取全部就诊人的ts数据类型
export interface AllUserResponseData extends ResponseData {
    data: AllUser
}

// 订单状态ts类型
export interface OrderState {
    "comment": string,
    "status": number
}

export type AllOrderState = OrderState[]

//订单状态接口返回的数据ts类型
export interface AllOrderStateResponseData {
    data: AllOrderState
}

//新增与修改已有的就诊人参数的数据类型
export interface AddOrUpdateUser {
    id?: string
    "name": string,
    "certificatesType": string,
    "certificatesNo": string,
    "sex": number,
    "birthdate": string,
    "phone": string,
    "isMarry": number,
    "isInsure": number,
    "addressSelected": string[],
    address:string
    "contactsName": string,
    "contactsCertificatesNo": string,
    "contactsCertificatesType": string,
    "contactsPhone": string,
    // "cardNo": "string",
    // "cityCode": "string",
    // "createTime": "2023-08-08T14:32:41.580Z",
    // "districtCode": "string",
    // "isDeleted": 0,
    // "param": {},
    // "provinceCode": "string",
    // "status": "string",
    // "updateTime": "2023-08-08T14:32:41.580Z",
    // "userId": 0
}